@import '~antd-mobile/dist/antd-mobile.less';
@import '../../animation.less';

:global {
  .am-button {
    a:hover {
      color: #fff;
    }
  }

  .am-button-ghost {
    a:hover {
      color: @brand-primary;
    }
  }
}

.test-paper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow-y: scroll;

  .top-wrap {
    padding: 20px 15px 0;
    min-height: calc(100vh - 115px);

    .title {
      font-size: 16px;
      letter-spacing: 1px;
    }

    .category {
      margin-top: 20px;
      margin-bottom: 25px;
      font-size: 22px;
      font-weight: 600;
    }

    .follow {
      position: absolute;
      right: 20px;
      top: 60px;
      width: 80px;
      height: 30px;

      .follow-ghost {
        height: 30px;
        line-height: 30px;
        color: @brand-primary;
        font-size: 13px;
        border-radius: 4px;
        text-align: right;
        //border: @border-width-sm solid @brand-primary;
      }

      img {
        width: 16px;
        vertical-align: middle;
        margin-right: 3px;
      }
    }

    .back {
      display: inline-block;
      font-size: 14px;
      color: @brand-primary;
      border: 1px solid @brand-primary;
      border-radius: 4px;
      padding: 6px 12px;
      font-weight: 400;
      position: absolute;
      right: 18px;
      top: 20px;
    }

    .question {
      .description {
        //line-height: 22px;
        letter-spacing: 1px;
        background-color: #f2f2f2;
        color: #5a5a5a;
        font-size: 16px;
        text-align: justify;
        padding: 15px 15px;
        margin-bottom: 25px;
        border-radius: 4px;
        position: relative;

        &:after {
          content: '';
          width: 0;
          height: 0;
          border-style: solid;
          border-width: 20px 20px 0 0;
          border-color: #f2f2f2 transparent transparent transparent;
          position: absolute;
          bottom: -20px;
          left: 20px;
        }
      }

      .options {
        .option {
          padding: 10px 8px 10px 20px;
          font-size: 14px;
          color: #5a5a5a;
          border-radius: 4px;
          box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1);
          margin-bottom: 15px;
          border: 1px solid transparent;
          display: block;
          background-color: #fff;
          outline: none;
          text-align: justify;
          position: relative;
          transition: all 0.1s linear;

          .checkbox-input {
            position: absolute;
            top: 0;
            left: 0;
            opacity: 0;
            width: 100%;
            height: 100%;
            z-index: 2;
            border: 0 none;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
          }

          &:before,
          &:after {
            content: '';
            width: 22px;
            height: 22px;
            position: absolute;
            top: 0;
            bottom: 0;
            right: 12px;
            margin: auto;
            opacity: 0;
          }

          &:before {
            background: url('../../assets/h5/i-wrong.svg') 50%/98% no-repeat;
          }

          &:after {
            background: url('../../assets/h5/i-choose.svg') 50%/98% no-repeat;
          }

          &.correct {
            &:after {
              opacity: 1;
            }
          }

          &.error {
            &:before {
              opacity: 1;
            }
          }

          &.opt-selected,
          &.opt-selected-wrong {
            color: @brand-primary;
            border: 1px solid @brand-primary;
          }
        }
      }
    }
  }

  .bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px 0;
    background: #fff;
    z-index: 1;

    .circle-progress {
      position: relative;
      width: 60px;
      height: 60px;

      .progress {
        transition: all 0.8s ease-out;
      }

      .num {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 14px;
        color: #333;
      }
    }

    :global {
      .am-button {
        flex: 1;
        font-size: 14px;
        font-weight: 400;
        margin: 0 15px;
      }
    }
  }

  .empty-content {
    padding: 180px 0;
    text-align: center;
    color: #b2b2b2;

    img {
      width: 100px;
      margin-bottom: 5px;
    }
  }
}
